import request from '@/utils/request'

/**
 * 获取权限与菜单
 */
export function getPermmenu() {
  return request<any, IPermmenuResp>({
    url: '/admin/base/comm/permmenu',
    method: 'GET'
  })
}

/**
 * 获取菜单列表数据
 */
export function getMenuList() {
  return request<any, IMenuListResp>({
    url: '/admin/base/sys/menu/list',
    method: 'POST'
  })
}

/**
 * 删除菜单
 */
export function delMenuList(data: any) {
  return request({
    url: '/admin/base/sys/menu/delete',
    method: 'POST',
    data
  })
}

/**
 * 新增菜单
 */
export function addMenu(data: any) {
  return request({
    url: '/admin/base/sys/menu/add',
    method: 'POST',
    data
  })
}

/**
 * 编辑菜单
 */
export function updateMenu(data: any) {
  return request({
    url: '/admin/base/sys/menu/update',
    method: 'POST',
    data
  })
}
